﻿using ReflectionStudio.Core.Events;
using System;
using System.Data;
using System.Windows;
using System.Windows.Data;
using System.ComponentModel;
namespace WPFExcelReport
{
    public partial class TSHR
    {
       
       
        public TSHR()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return; 
            MV = new VICC_HRSTAMM();
            DataContext = MV;
            InitializeComponent(); 
        }
        public override void vwMaster_CurrentChanged(object sender, EventArgs e)
        {
            //base.vwMaster_CurrentChanged(sender, e);
            if (dwMain ==null)
            { }

            if (dwMaster == null)
            {
                KEY = "";
            }
            else
            {
                KEY = dwMaster["USERID"].ToString().PadRight(8);
            }
        }
        public override void Window_Loaded(object sender, RoutedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            if (IsLoaded)
                return;
            Load();
            base.Window_Loaded(sender, e);
           
        }
        public void Load()
        {
            SResult = ((VICC_HRSTAMM)MV).QIHR99(dwData);
            MergeData(SResult,false);
         }  
    }
}
